using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;

namespace OrderingSystem.Core.Entities
{
    [Table("caipinxinxi")]
    public class Dish
    {
        [Column("id")]
        public long id { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        [Column("addtime")]
        public DateTime addtime { get; set; }

        /// <summary>
        /// 菜品名称
        /// </summary>
        [Column("caipinmingcheng")]
        public string caipinmingcheng { get; set; }

        /// <summary>
        /// 菜品分类
        /// </summary>
        [Column("caipinfenlei")]
        public string caipinfenlei { get; set; }

        /// <summary>
        /// 分类导航属性
        /// </summary>
        [NotMapped]
        public Category Category { get; set; }

        /// <summary>
        /// 图片
        /// </summary>
        [Column("tupian")]
        public string tupian { get; set; }

        /// <summary>
        /// 菜品价格
        /// </summary>
        [Column("caipinjiage")]
        public int caipinjiage { get; set; }

        /// <summary>
        /// 材料
        /// </summary>
        [Column("cailiao")]
        public string cailiao { get; set; }

        /// <summary>
        /// 份量
        /// </summary>
        [Column("fenliang")]
        public string fenliang { get; set; }

        /// <summary>
        /// 菜品介绍
        /// </summary>
        [Column("caipinjieshao")]
        public string caipinjieshao { get; set; }

        /// <summary>
        /// 最近点击时间
        /// </summary>
        [Column("clicktime")]
        public DateTime? clicktime { get; set; }

        /// <summary>
        /// 点击次数
        /// </summary>
        [Column("clicknum")]
        public int clicknum { get; set; }

        /// <summary>
        /// 上架状态
        /// </summary>
        [Column("shangjia")]
        public string shangjia { get; set; } = "是";
    }
} 